package com.club.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zhangfc
 * @date 2022/12/12 16:03
 */
@Data
@Builder(toBuilder = true)
@TableName(value = "t_club")
public class TClub implements Serializable {

    private static final Long serialVersionUUID = 1L;
    /**
     * 社团的主键
     */
    @TableId(value = "club_id",type = IdType.AUTO)
    private int clubId;

    /**
     * 创建人id
     */
    @TableField(value = "user_id")
    private int userId;

    /**
     * 编号
     */
    @TableField(value = "club_number")
    private String clubNumber;

    /**
     * 名称
     */
    @TableField(value = "club_name")
    private String clubName;

    /**
     * 成立时间
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField(value = "club_create")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date clubCreate;

    /**
     * 社团的简介
     */
    @TableField(value = "club_message")
    private String clubMessage;

    /**
     * 申请说明
     */
    @TableField(value = "club_remark")
    private String clubRemark;

    /**
     * 社团类型
     */
    @TableField(value = "club_type")
    private String clubType;

    /**
     * 状态 0-审核中 1-审核通过 2-审核失败
     */
    @TableField(value = "club_status")
    private String clubStatus;

    /**
     * 创建时间
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField(value = "createtime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改时间
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField(value = "modifytime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
}
